import type { App, VNode } from 'vue'
import Loading from './index.vue'
import { createVNode, render } from 'vue';

export default {
    install(app: App) {
        console.log(Loading);
        const Vnode: VNode = createVNode(Loading)
        //绑定后具有component属性
        render(Vnode, document.body)
        console.log(Vnode);

        app.config.globalProperties.$loadingg = {
            show: Vnode.component?.exposed?.show,
            hide: Vnode.component?.exposed?.hide
        }
        app.config.globalProperties.$loadingg.show()


    }
}
